package com.weiai.wedding.app.file.handle.pic;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.weiai.wedding.app.file.handle.FileHandle;
import com.weiai.wedding.util.CompressPic;
import com.weiai.wedding.vo.HandleFileVO;

@Component(value = "img")
public class FileHandlePic implements FileHandle {
	@Autowired
	private CompressPic compressPic;

	@Override
	public void handleFile(HandleFileVO handleFileVO) {
		// TODO Auto-generated method stub
		compressPic.compressPic(handleFileVO.getInputPath(),
				handleFileVO.getOutputPath(), handleFileVO.getInputFileName(),
				handleFileVO.getOutputFileName(),handleFileVO.getWeight(),handleFileVO.getHeight(),false);
	}
}